package socket.myRPC.rpc.transport;

import io.netty.channel.socket.nio.NioSocketChannel;

public class ClientPool {
  public NioSocketChannel[] clients;
  // 这个 用来加锁的对象
  public Object[] lock;
  
  ClientPool(int size) {
    // 构建 数组实例
    clients = new NioSocketChannel[size];
    lock = new Object[size];
    
    // 给数组中 存放 object对象，用来加锁
    for (int i = 0; i < size; i++)
      lock[i] = new Object();
  }
}
